<?php
    $today = getdate();
    $xq=0;$xn=0;
    if ($today["mon"]>2 && $today["mon"]<9){
        $xq=1;$xn=1;
    }else if($today["mon"]<=2){
        $xn=1;
    };
    
$yuwen=120;$shuxue=120;$yingyu=110;$kexue=150;$shehui=80;$zhengzhi=80;
$youxiu=0.85;$jige=0.6;$fn=100;$ln=100;$fxpercent=20;$lxpercent=20;
if (isset($_COOKIE["yuwen"])) $yuwen = $_COOKIE["yuwen"];
if (isset($_COOKIE["shuxue"])) $shuxue = $_COOKIE["shuxue"];  
if (isset($_COOKIE["yingyu"])) $yingyu = $_COOKIE["yingyu"];  
if (isset($_COOKIE["kexue"])) $kexue = $_COOKIE["kexue"];  
if (isset($_COOKIE["shehui"])) $shehui = $_COOKIE["shehui"];
if (isset($_COOKIE["zhengzhi"])) $zhengzhi = $_COOKIE["zhengzhi"];
if (isset($_COOKIE["youxiu"])) $youxiu = $_COOKIE["youxiu"]; 
if (isset($_COOKIE["jige"])) $jige = $_COOKIE["jige"];
if (isset($_COOKIE["fn"])) $fn = $_COOKIE["fn"];
if (isset($_COOKIE["ln"])) $ln = $_COOKIE["ln"];
if (isset($_COOKIE["fxpercent"])) $fxpercent = $_COOKIE["fxpercent"];
if (isset($_COOKIE["lxpercent"])) $lxpercent = $_COOKIE["lxpercent"];   
?>
<html>
<head>
<STYLE>
<!--
body, table, tr, td {font-size: 12px; font-family: Verdana, MS sans serif, Arial, Helvetica, sans-serif}
.MAXMark {
	width: 30px;
	border: 1px solid #006699;
	background-color: #E8EFF7;
	text-align: right;
}
.ym {
	width: 45px;
	border: 1px solid #006699;
	background-color: #E8EFF7;
	text-align: right;
}
.fk {
	border: 1px solid #006699;
	background-color: #E8EFF7;
}
.STYLE5 {
	font-size: 12px;
	color: #008ACC;
}


-->
</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body text="#000000" link="#000000" vlink="#000000" alink="#000000" topmargin="0" leftmargin="10" marginwidth="0" marginheight="0">

<table width="100%" align="center" bgcolor="#006699">
<tr>
	<td>&nbsp;</td>
	<td width="50%"><font color="#FFFFFF" size="+3">李兴贵中学成绩统计 </font><span class="STYLE5">by 邱鸿翔  phpExcelreader<A HREF="whatsnew.html" target="_blank">L</a></span> </td>
	<td width="50%" align="right">&nbsp;</td>
	<td>&nbsp;</td>
</tr>
</table>




<table width="100%" border="0" align="center" bgcolor="#7EA9D3">
<tr>
<td height="95">&nbsp;</td>
<td><p> <img src="exp.gif" alt="范例" width="499" height="47"><br>
  <br>
  学号；姓名；班级；必须按照此顺序。</p></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
 <form name="exc_upload" method="post" action="analyser.php" enctype="multipart/form-data">
   <fieldset>
<legend>选择excel文件</legend>
<input name="excel_file" type="file" class="fk" size=30>
   </fieldset>
<br>
<fieldset>
<legend>满分分值设置<br>
</legend>
<table width="325" border="0" cellpadding="0" cellspacing="1" bordercolor="#000000">
  <tr>
    <td width="61" align="right">学科:</td>
    <td width="35" align="right">语文</td>
    <td width="35" align="right">数学</td>
    <td width="35" align="right">英语</td>
    <td width="35" align="right">科学</td>
    <td width="35" align="right">社会</td>
	<td width="35" align="right">政治</td>
  </tr>
  <tr>
    <td align="right">满分分值:</td>
    <td align="right"><input name="yuwen" type="text" class="MAXMark" id="yuwen" value="<?php echo $yuwen ?>"></td>
    <td align="right"><input name="shuxue" type="text" class="MAXMark" id="shuxue" value="<?php echo $shuxue ?>"></td>
    <td align="right"><input name="yingyu" type="text" class="MAXMark" id="yingyu" value="<?php echo $yingyu ?>"></td>
    <td align="right"><input name="kexue" type="text" class="MAXMark" id="kexue" value="<?php echo $kexue ?>"></td>
    <td align="right"><input name="shehui" type="text" class="MAXMark" id="shehui" value="<?php echo $shehui ?>"></td>
	<td align="right"><input name="zhengzhi" type="text" class="MAXMark" id="zhengzhi" value="<?php echo $zhengzhi ?>"></td>
  </tr>
</table>
</fieldset>
<br>
<fieldset>
<legend>优秀/及格分数线设置</legend>
<table width="129" border="0" cellpadding="1" cellspacing="2" bordercolor="#000000">
  <tr>
    <td width="33">&nbsp;</td>
    <td width="35">优秀</td>
    <td width="35">及格</td>
    </tr>
  <tr>
    <td>系数</td>
    <td><label>
      <input name="youxiu" type="text" class="MAXMark" id="youxiu" value="<?php echo $youxiu ?>">
    </label></td>
    <td><label>
      <input name="jige" type="text" class="MAXMark" id="jige" value="<?php echo $jige ?>">
    </label></td>
  </tr>
</table>
若满分分值=120，优秀系数=0.85，及格系数=0.6，则高于102(=120*0.85)为优秀，高于72(=120*0.6)为及格。<br>
</fieldset>
<br>
<fieldset>
<legend></legend>
<label>列出前
<input name="fn" type="text" class="MAXMark" id="fn" value="<?php echo $fn ?>" size="4">
名，后
<input name="ln" type="text" class="MAXMark" id="ln" value="<?php echo $ln ?>" size="4">
名学生名单<br>
列出全年级各科前
<input name="fxpercent" type="text" class="MAXMark" id="fxpercent" value="<?php echo $fxpercent ?>">
%，后
<input name="lxpercent" type="text" class="MAXMark" id="lxpercent" value="<?php echo $lxpercent ?>">
%</label>
分布情况
</fieldset>
<br>
<fieldset>
<legend>标题设置</legend>
<label>大标题：
<input name="title1" type="text" class="fk" id="title1" style="width:200px" value="学生考试成绩统计表">
</label>

<input name="title2" type="text" class="ym" id="title2" value="<?php echo ($today["year"].".".$today["mon"]) ?>">
<br>
副标题：
<label>
<input type="text" name="titleb1" id="titleb1" class="fk" style="width:35" value="<?php echo(substr($today["year"]-2-$xn,2))?>级">

<?php
$nnn=9;
?>
<select name="titleb2" class="fk" id="titleb2">
  <option <?php if ($nnn==7) echo "selected"; ?>>初一</option>
  <option <?php if ($nnn==8) echo "selected"; ?>>初二</option>
  <option <?php if ($nnn==9) echo "selected"; ?>>初三</option>
</select>

<input type="text" name="titleb3" id="titleb3" class="fk" style="width:60" value="<?php echo($today["year"]-$xn."学年") ?>">

<select name="titleb4" class="fk" id="titleb4">
	<option <?php if ($xq==0) echo "selected"; ?>>第一学期</option>
    <option <?php if ($xq==1) echo "selected"; ?>>第二学期</option>
</select>
<input name="titleb5" type="text" class="fk" id="titleb5" style="width:150" value="学习效果自我评估">
</label>
</fieldset>
<br>
<br>
  <input name="button" type="button" onClick="javascript:if(document.exc_upload.excel_file.value.length==0) { alert('必须选择一个Excel文件'); return; }; submit();" value="开始分析">
 </form></td>
</tr>
</table>
</body>
</html>